#include <stdio.h>

int main(int argc, char *argv[])
{
	unsigned int n, i, j, p, c, case_num = 1;
	float s[64], t, cnt;
	scanf("%d", &n);

	n = 5;
	while (n--) {
		scanf("%d %d", &p, &c);
		for (i=0; i<p; i++) {
			scanf("%f", &s[i]);
		}

		for (i=0; i<p-1; i++) {
			for (j=i+1; j<p; j++) {
				if (s[i] < s[j]) {
					t = s[i];
					s[i] = s[j];
					s[j] = t;
				}
			}
		}

		for (i=0; i<p; i++) printf("%.0f ", s[i]);
		printf("\n");

		cnt = 0;
		


		case_num++;
	}

	return 0;
}
